package com.x.attendance.assemble.control.jaxrs.attendance;

import com.google.gson.JsonElement;
import com.x.base.core.project.http.ActionResult;
import com.x.base.core.project.http.EffectivePerson;
import com.x.base.core.project.logger.Logger;
import com.x.base.core.project.logger.LoggerFactory;

import java.util.ArrayList;
import java.util.List;

public class ActionListAttendanceRecords extends BaseAction {

    private static Logger logger = LoggerFactory.getLogger(ActionListAttendanceRecords.class);

    public ActionResult<Wo> execute(EffectivePerson effectivePerson, JsonElement jsonElement) throws Exception {
        ActionResult<Wo> result = new ActionResult<>();
        
        try {
            // TODO: 实现获取考勤记录列表逻辑
            Wo wo = new Wo();
            wo.setRecords(new ArrayList<>());
            wo.setTotal(0L);
            result.setData(wo);
        } catch (Exception e) {
            logger.error(e);
            throw e;
        }
        
        return result;
    }

    public static class Wo {
        private List<Object> records;
        private Long total;

        public List<Object> getRecords() {
            return records;
        }

        public void setRecords(List<Object> records) {
            this.records = records;
        }

        public Long getTotal() {
            return total;
        }

        public void setTotal(Long total) {
            this.total = total;
        }
    }
}

